﻿using SWBetongXaydung.DAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SWBetongXaydung.BLL
{
    class TramCapBLL
    {
        public static List<TramCapBeTong> GetList(BETONGXAYDUNGEntities dbContext = null)
        {
            if (dbContext != null)
                return dbContext.TramCapBeTongDbSet.ToList();
            using (var db = DBContextHelper.GetContext())
            {
                return db.TramCapBeTongDbSet.ToList();
            }
        }

        internal static TramCapBeTong GetTramCap(int IDTramCap)
        {
            return GetList().Find(e => e.IDTramCap == IDTramCap);
        }
    }
}
